package cn.wsalix.sale.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import lombok.Data;
import lombok.EqualsAndHashCode;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import cn.anlaser.entity.CommonEntity;

@Entity
@Table(name = "SALE_MONTH")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@DynamicUpdate
@DynamicInsert
@Data
@EqualsAndHashCode(callSuper = false)
public class SaleMonth extends CommonEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = -6133984070037311209L;
	@Temporal(TemporalType.DATE)
	private Date month;//月
	private Long productId;//产品ID
	@Column(columnDefinition = "int default 0", nullable = false)
	private int saleCount;//销售数量
	@Column(columnDefinition = "int default 0", nullable = false)
	private int toRefund;//退货数量
}